import java.net.InetSocketAddress;

/**
 * Created by shirenchuang on 2017/3/21.
 * 测试 Rpc
 */
public class RpcGoTest {

    public static void main(String[] args){

    /*    new Thread(new Runnable() {
            public void run() {
                try {
                    RegisterServiceFacade serviceServer = new RegisterServiceFacadeImpl(8088);
                    serviceServer.register(HelloRpcFacade.class, HelloRpcServiceImpl.class);
                    serviceServer.start();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }).start();*/


        HelloRpcFacade service = RpcClient.getRemoteProxyObj(HelloRpcFacade.class, new InetSocketAddress("localhost", 8088));
        String a = service.sayHi("test");

        System.out.println(a);

    }
}
